Skip to content

Hall of Claws: local leaderboard + personal-best burst - #12

Merged
cmalpass merged 1 commit into
mainfrom
cmalpass-potential-enigma
Aug 27, 2026
Merged

Hall of Claws: local leaderboard + personal-best burst#12
cmalpass merged 1 commit into
mainfrom
cmalpass-potential-enigma

Conversation

@cmalpass

Copy link
Copy Markdown
Owner

Closes out the enhancement program (feature 10 of 10).

Hall of Claws — a local leaderboard screen (menu button or press L):

  • Top-10 runs ranked by score (time breaks ties), with medals for the podium, gold score bars, level/difficulty/time/date columns
  • Every completed run is recorded (100-run rolling history in localStorage)
  • Two-tap "Clear hall" to wipe the board
  • The victory panel shows your placement, e.g. "Hall of Claws Add Daily Rex: seeded daily challenge level #3 of 3"

Personal-best burst — when your score overtakes the best from the start of the run, a one-time "NEW PERSONAL BEST!" celebration fires: floating text, status toast, confetti burst, and a rising arpeggio. The baseline is captured at run start so an overtake that only happens via the end-of-run time/heart bonuses still triggers it on the victory frame.

Validation (local gate — CI has pre-existing unrelated failures):

  • npm run typecheck
  • npm test — 256/256 (17 new leaderboard tests, incl. a victory-frame PB regression)
  • npm run build — 147.68 kB / 45.46 kB gzip
  • npm run lint
  • Headless Playwright E2E: 14/14 (boot, menu button, L-toggle, empty hall, play a run, victory, PB burst, run persisted, survives reload, two-tap clear, zero page errors)

- store.ts: RunRecord API (getRuns/addRun/topRuns/clearRuns), 100-run cap
- input.ts: 'hall' key (L)
- audio.ts: 'personalBest' arpeggio SFX
- game.ts: hall menu screen (top-10 with medals, score bars, two-tap
  clear), run recorded on victory, "Hall of Claws #N of M" line on the
  victory panel, one-time NEW PERSONAL BEST burst when the run overtakes
  the run-start best (baseline captured at run start so the victory
  frame's bonus-driven overtake still fires)
- tests/leaderboard.test.ts: 17 tests (store, menu, PB burst incl.
  victory-frame regression, two-tap clear)
@cmalpass
cmalpass merged commit a4f6306 into main Aug 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant